// JavaScript Document
//自动检验cookie的值！如果Cookie的值为gouwutu&&gouwubidu则自动跳转页面，
function autoJump()
{
	var tmp =readCookie("cookieName");
	if(tmp=="gouwutu&&gouwubidu")
	{
		//document.getElementById("mustSee").style.display="none";
		document.getElementById("mustSee").parentNode.removeChild(document.getElementById("mustSee"));
	}else{
		document.getElementById("mustSee").style.display="block";
	}	
	document.getElementById("Iframes").innerHTML='<iframe src="http://www.gouwutu.com/v2/php/newbuy.php" name="zhufuyu" width="970" marginwidth="0" height="250" marginheight="0" align="middle" scrolling="no" frameborder="0" allowtransparency="true"></iframe>';
}
//读取Cookie的值得方法！
function readCookie(name)
{
	var cookieValue = "";
	var search = name + "=";
	if(document.cookie.length > 0)
	{
		offset = document.cookie.indexOf(search);
		if(offset != -1)
		{
			offset += search.length;
			end = document.cookie.indexOf(";",offset);
			if (end == -1) end = document.cookie.length;
			cookieValue = unescape(document.cookie.substring(offset, end))
		}
	}
	return cookieValue;
}
//添加cookie
function addCookie(objName,objValue,objHours)
{
	var str = objName + "=" + escape(objValue);
	if(objHours > 0)
	{//为0时不设定过期时间，浏览器关闭时cookie自动消失
		var date = new Date();
		var ms = objHours*3600*1000;
		date.setTime(date.getTime() + ms);
		str += ";expires=" + date.toGMTString()+";path="+"/"+";";
	}
    document.cookie = str;
    //alert("添加cookie成功");
}
function subm()
{
	if (document.getElementById("mustcheck").checked)
	{
		addCookie("cookieName","gouwutu&&gouwubidu","99999999");
	}
	document.getElementById("mustSee").style.display="none";
}